<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@page import="com.webapp.model.Advertisement, java.util.List" %>

<!-- include moo talk header file -->
<%@ include file="MooTalkHeader.jsp" %>

		<div id="site_content_text">
			<% 
				String x = request.getParameter("ads"); 
				if(x != null) {
					
					if(x.equals("created")) {
						%>
							<p style="color:red;">
								Advertisement Created!
							</p>
						<%
					}
					
					if(x.equals("removed")) {
						%>
							<p style="color:red;">
								Advertisement was removed!
							</p>
						<%
					}
					
					if(x.equals("disable")) {
						%>
							<p style="color:red;">
								You do not have this function!
							</p>
						<%
					}
					
					if(x.equals("error")) {
						%>
							<p style="color:red;">
								There was an error creating the advertisement!
							</p>
						<%
					}
					
					if(x.equals("no advertisements")) {
						%>
							<p style="color:red;">
								Sorry you have no advertisements!
							</p>
						<%
					}
				} 
			%>
			<h2>Create an advertisement</h2>
			<form action="CreateAd.do" method="post">
				<input type="hidden" name="ADEMPLOYEE" value="<%=employee.getEmployeeId()%>"/>
				<table>
					<tr>
						<td>Ad Name: <br/> <input type="text" name="ADNAME" value=""/></td>
					</tr>
					<tr>
						<td>Company Name: <br/> <input type="text" name="ADCOMPANY" value=""/></td>
					</tr>
					<tr>
						<td>Ad Content <br/> <textarea name="ADTEXT" rows="5" cols="20"></textarea></td>
					</tr>
					<tr>
						<td>Ad Price: <br/> <input type="text" name="ADPRICE" value=""/></td>
					</tr>
					<tr>
						<td>Ad Type: <br/> <input type="text" name="ADTYPE" value=""/></td>
					</tr>
					<tr>
						<td>Ad Units: <br/> <input type="text" name="ADUNIT" value=""/></td>
					</tr>
					<tr>
						<td><input type="submit" class="btn" value="Add Ad!"/></td>
					</tr>
				</table>
			</form>
			
			<h2>Delete an advertisement</h2>
			<form action="DeleteAd.do" method="post">
				<table>
						<tr>
							<td>AD ID: <br/> <input type="text" name="ADID" value=""/></td>
						</tr>
						<tr>
							<td><input type="submit" class="btn" value="Delete Ad!"/></td>
						</tr>
				</table>
			</form>
			
			<h2>Record a transaction</h2>
			<form action="RecordTrans.do" method="post">
				AD ID: <br/> <input type="text" name="ADID" value=""/><br/>
				Customer ID: <br/> <input type="text" name="ID" value=""/><br/>
				<input type="submit" class="btn" value="Record Transaction!"/>
			</form>
			
			<h2>Add User</h2>
			<form action="Register.jsp" method="post">
				<input type="submit" value="Create New User" />
			</form>
			
			<h2>Edit and Delete information for a customer</h2>
			<form action="GetCustomer.do" method="post">
				<table>
						<tr>
							<td>Customer ID: <br/> <input type="text" name="CUSTID" value=""/></td>
						</tr>
						<tr>
							<td><input type="submit" class="btn" value="Get Customer!"/></td>
						</tr>
				</table>
			</form>
			
			<h2>Produce customer mailing lists</h2>
			<form action="CustomerMailing.do" method="post">
				<input type="submit" class="btn" value="Mailing List"/>
			</form>
			
			
			<h2>Produce a list of item suggestions for a given customer (based on that customer's past transactions)</h2>
			<form action="ItemsCustomer.do" method="post">
				<table>
						<tr>
							<td>Customer ID: <br/> <input type="text" name="CUSTID" value=""/></td>
						</tr>
						<tr>
							<td><input type="submit" class="btn" value="Get Items for Customer!"/></td>
						</tr>
				</table>
			</form>
			
		
			
		</div>
		
<!--  include moo talk footer file -->
<%@ include file="MooTalkFooter.jsp" %>
